<!DOCTYPE html>
<html>
   <head>
      <title>中骏森驰考勤查询</title>
      <meta name="viewport" content="width=device-width, initial-scale=1.0 Access-Control-Allow-Origin">
      <!-- 引入 Bootstrap -->
      <!--<link href="<?=base_url('html/bootstrap_v3/css/bootstrap.css')?>" rel="stylesheet">-->
      <link href="<?=  base_url('/html/bootstrap_v3/css/bootstrap.css')?>" rel="stylesheet">
      <link href="<?=base_url('html/bootstrap_v3/datepicker/css/bootstrap-datetimepicker.min.css')?>" rel="stylesheet">
      <script src="<?=base_url('html/js/jquery-1.8.3.min.js')?>"></script>
      <script src="<?=base_url('html/bootstrap_v3/js/bootstrap.min.js')?>"></script>
      <script src="<?=base_url('html/bootstrap_v3/datepicker/js/bootstrap-datetimepicker.js')?>"></script>
      <script src="<?=base_url('html/bootstrap_v3/datepicker/js/locales/bootstrap-datetimepicker.zh-CN.js')?>"></script>
      <script>
      $('.goDate').datetimepicker({
        language: 'zh-CN',
        weekStart: 1,
        todayBtn: 1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2,
        forceParse: 0,
        showMeridian: 1
      });
      </script>
      
      <!-- HTML5 Shim 和 Respond.js 用于让 IE8 支持 HTML5元素和媒体查询 -->
      <!-- 注意： 如果通过 file://  引入 Respond.js 文件，则该文件无法起效果 -->
      <!--[if lt IE 9]>
         <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
         <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
      <![endif]-->
   </head>
   <body>
      <div class="container">
      <form action="" class="form-horizontal" role="form">
        <fieldset>
          <legend class="text-center" style="font-weight:bold;font-size:2em;">
            打卡记录信息
          </legend> 
            <div class="panel-group" id="accordion">
                <?php foreach ($data as $value):?>
                <div class="panel panel-default">
                  <div class="panel-heading">
                    <h4 class="panel-title">
                      <a data-toggle="collapse" data-parent="#accordion" 
                         href="#<?=$value['href']?>">
                        <?=$value['date_show']?>打卡记录信息
                      </a>
                    </h4>
                  </div>
                  <div id="<?=$value['href']?>" class="panel-collapse collapse">
                    <div class="panel-body">
                        <?php if(!isset($value['checkData'])):?>
                        <b>数据暂缺或无打卡记录！</b>
                        <?php else:?>  
                            <table class="table  table-bordered">
                                <!--
                                <thead>
                                   <tr>
                                      <th>项目明细</th>
                                      <th>项目金额</th>
                                   </tr>
                                </thead>
                                -->
                                <tbody>		
                                    <tr class="warning">
                                        <td>姓名</td>
                                        <td><?=$username?></td>
                                    </tr>
                                    <?php foreach ($value['checkData'] as $val):?>
                                        <?php if($val['EMPNO'] == null):?>								
                                                <b>无打卡记录或打卡信息数据未同步！</b>
                                        <?php else:?>
                                                    
                                                <tr class="<?php if($val['CHECKTIME'] < "08:00:00" or $val['CHECKTIME'] > "17:15:00"){
                                                                    echo "success";
                                                }else{
                                                    echo "danger";
                                                }?>">
                                                  <td>打卡记录</td>
                                                  <td><?=$val['CHECKDATE']." ".$val['CHECKTIME']?></td>
                                                </tr>
                                        <?php endif;?>
                                    <?php endforeach;?>
                                </tbody>
                             </table>
                        <?php endif;?>
                    </div>
                  </div>
                </div>
                <?php endforeach; ?>
            </div>
    </fieldset>
    </form>
    </div>
    <script type="text/javascript">
      $('.goDate').datetimepicker({
        language: 'zh-CN',
        weekStart: 1,
        todayBtn: 1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2,
        forceParse: 0,
        showMeridian: 1
      });
      /*
      $('.backDate').datetimepicker({
        language: 'zh-CN',
        weekStart: 1,
        todayBtn: 1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2,
        forceParse: 0,
        showMeridian: 1
      });
      */
     function showsales(thisid){
         $("#"+thisid).click();
     }
    </script>
   </body>
</html>